<html>
<head>
    <meta charset="UTF-8">
    <title>课程</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-table.css">
    <link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css">
    <!--    <link href="https://cdn.bootcss.com/ionic/1.3.2/css/ionic.css" rel="stylesheet">-->

    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bootstrap-table.js"></script>
    <script src="js/bootstrap-table-zh-CN.js"></script>
    <script src="js/bootstrap-datetimepicker.min.js"></script>
    <script src="js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="js/jquery.form.min.js"></script>
    <style>

        .createStyle{
            margin-left: 100px;
            margin-top: 20px;
            margin-bottom: 20px;
        }
        #CourseTable {
            width: 1150px;
            margin-left: 100px;
            border: 1px solid #dddddd;
        }
        .btnStyle{
            float: left;
        }
        .welcome{
            margin-left: 100px;
            margin-top:30px;
            font-size: 25px;
        }
    </style>
</head>
<body>
<p class="welcome">欢迎您，<span id="userName"></span></p>
<!-- 按钮触发模态框 -->
<button class="btn btn-info btn-sm createStyle" data-toggle="modal" data-target="#myModal" id="showModal">
    创建课程
</button>
<button class="btn btn-info btn-sm createStyle" data-toggle="modal" data-target="#myAssignmentModal" id="showAssignmentModal">
    创建作业
</button>
<button class="btn btn-info btn-sm createStyle" data-toggle="modal" data-target="#myActivityModal" id="showActivityModal">
    创建活动
</button>
<!-- 添加课程的模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    创建课程
                </h4>
            </div>
            <form enctype="multipart/form-data" method="post" id="myForm">
                <div class="modal-body">
                    <input type="hidden" id="courseId" name="courseId">
                    <div>
                        <label>课程名：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="text" id="courseName" name="courseName">
                    </div>
                    <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                        <label>开始时间：</label>
                        <input type="text" id="startTime" name="startTime" readonly>
                        <span class="add-on"><i class="icon-remove"></i></span>
                        <span class="add-on"><i class="icon-calendar"></i></span>
                    </div>
                    <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                        <label>结束时间：</label>
                        <input type="text" id="endTime" name="endTime" readonly>
                        <span class="add-on"><i class="icon-remove"></i></span>
                        <span class="add-on"><i class="icon-calendar"></i></span>
                    </div>
                    <div id="studentList">
                        <label>学生名单：</label>
                        <input class="file" type="file" name="file" id="file"/>
                    </div>
                </div>
            </form>
                <div class="modal-footer">
                    <input class="btn btn-success" type="button" value="提交" id="addCourse" class ="btnStyle">
                    <input class="btn btn-primary" type="button" value="修改" id="changeCourseInfo" class ="btnStyle">>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <!--<button type="button" id="changeCourseInfo">修改</button>-->
                </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--显示课程列表的table-->
<table id="CourseTable"></table>

<!--Assignment的代码-->

<!-- 添加作业的模态框（Modal） -->
<div class="modal fade" id="myAssignmentModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myAssignmentModalLabel">
                    创建作业
                </h4>
            </div>
            <div class="modal-body">
                <input type="hidden" id="courseIdConnAssignment">
                <input type="hidden" id="assignmentId">
                <div>
                    <label>作业名：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <input type="text" id="assignmentName">
                </div>
                <div>
                    <label>作业描述：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <input type="text" id="assignmentDescription">
                </div>
                <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                    <label>开始时间：</label>
                    <input type="text" id="assignmentStartTime" readonly>
                    <span class="add-on"><i class="icon-remove"></i></span>
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
                <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                    <label>结束时间：</label>
                    <input type="text" id="assignmentEndTime" readonly>
                    <span class="add-on"><i class="icon-remove"></i></span>
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="addAssignment" class ="btnStyle">>创建</button>
                <button type="button" class="btn btn-primary" id="changeAssignmentInfo" class ="btnStyle">>修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--Activity的代码-->

<!-- 添加作业的模态框（Modal） -->
<div class="modal fade" id="myActivityModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myActivityModalLabel">
                    创建活动
                </h4>
            </div>
            <div class="modal-body">
                <input type="hidden" id="assignmentIdConnActivity">
                <input type="hidden" id="activityId">
                <div>
                    <label>活动名称：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <input type="text" id="activityName">
                </div>
                <div>
                    <label>活动类型：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <select id="activityType">
                        <option value="讨论室">讨论室</option>
                        <option value="对话">对话</option>
                    </select>
                </div>
                <div>
                    <label>活动描述：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <input type="text" id="activityDescription">
                </div>
                <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                    <label>开始时间：</label>
                    <input type="text" id="activityStartTime" readonly>
                    <span class="add-on"><i class="icon-remove"></i></span>
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
                <div class="input-append date form_datetime" data-date="2013-02-21T15:25:00Z">
                    <label>结束时间：</label>
                    <input type="text" id="activityEndTime" readonly>
                    <span class="add-on"><i class="icon-remove"></i></span>
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="addActivity" class ="btnStyle">>创建</button>
                <button type="button" class="btn btn-primary" id="changeActivityInfo" class ="btnStyle">>修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!-- 获取学生对话的模态框 -->
<div class="modal fade" id="myDialogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myDialogModalLabel">
                    学生对话信息
                </h4>
            </div>
            <div class="modal-body">
                <div id="showDialog"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!-- 删除时显示的对话框 -->
<div class="modal fade" id="myDeleteModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myDeleteModalLabel">
                    操作提示
                </h4>
            </div>
            <div class="modal-body">
                <p>您确定要删除吗？</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" id="confirmDelete" data-dismiss="modal" class ="btnStyle">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>



<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/course.js"></script>
</body>
</html>